package com.ruoyi.mixuebingcheng.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * VIEW业务对象 view_coupon
 *
 * @author ruoyi
 * @date 2023-10-27
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class ViewCouponBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long id;

    /**
     * 优惠券id
     */
    @NotNull(message = "优惠券id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long couponId;

    /**
     * 用户id
     */
    @NotNull(message = "用户id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 券名
     */
    @NotBlank(message = "券名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;

    /**
     * 起效时间
     */
    @NotNull(message = "起效时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date effectiveTime;

    /**
     * 失效时间
     */
    @NotNull(message = "失效时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date expirationTime;

    /**
     * 1为按百分比折扣，2以元为单位
     */
    @NotNull(message = "1为按百分比折扣，2以元为单位不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long type;

    /**
     * 折扣额度
     */
    @NotNull(message = "折扣额度不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long value;

    /**
     * 1已删除
     */
    @NotNull(message = "1已删除不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long isDeleted;

    /**
     * 状态（0未使用、1已使用）
     */
    @NotNull(message = "状态（0未使用、1已使用）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long status;


}
